SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

/*
        Powerweb Application, Cyberwolf Inc.
        Project Name:   	DISC
        Module Name:	  	DISC_Download
        SP Name:         	DISC_StampFilesSelectByDate
        Author Name:    	Ruben Lopez
        Created on:     	01/19/2010
        Description:    	Selects all the records with the status 'Generated' and a DateRequested older or equal than the date passed.

		Revision History:
		01/19/2010 Ruben Lopez: Generated
*/
CREATE PROCEDURE [dbo].[DISC_StampFilesSelectByDate]
	@DateRequested datetime
AS
BEGIN
	SELECT ID, Url, IP, [Status], DateRequested, [FileName]
	FROM DISC_StampFiles
	WHERE [Status] = 'Generated' AND DateRequested <= @DateRequested
END
GO
